package com.weaver.drools.business.drools.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.weaver.drools.business.drools.service.IActRuleService;
import com.weaver.drools.common.dao.ActRuleDao;
import com.weaver.drools.common.entity.ActRule;


/**
 *  @application name: 
 *  @author: zhouxinlei 
 *  @time：2018年10月8日
 *  @version：ver 1.1
 */
@Service
public class ActRuleServiceImpl implements IActRuleService {
	
	@Resource
	private ActRuleDao ruleDao;
	
	public void deleteActRule(Long actRuleId) {
		ruleDao.deleteById(actRuleId);
	}

	public ActRule saveActRule(ActRule actRule) {
		ruleDao.save(actRule);
		return actRule;
	}

	public ActRule updateActRule(ActRule actRule) {
		ruleDao.save(actRule);
		return actRule;
	}

	public List<ActRule> findActRuleList() {
		List<ActRule> list = ruleDao.findAll();
		return list;
	}

	public ActRule findById(Long actRuleId) {
		ActRule rule = ruleDao.findActRuleByActRuleId(actRuleId);
		return rule;
	}

	@Override
	public void deleteActRuleByUserId(Long userid) {
		
	}

}
